<script setup></script>

<template>
  <div>
    <h1>Login</h1>
    <button @click="dologin">登录</button>
  </div>
</template>
<script lang="js" setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const dologin = () => {
  const token = 'asdfasdfasdfasdfasdfasdfasdfas'
  sessionStorage.setItem('token', token)
  router.push({ name: 'home' })
}
</script>
